An Automata-Based Approach to Pattern Matching
نویسنده
چکیده
Due to its importance in security, syntax analysis has found usage in many high-level programming languages. The Lisp language has its share of operations for evaluating regular expressions, but native parsing of Lisp code in this way is unsupported. Matching on lists requires a significantly more complicated model, with a different programmatic approach than that of string matching. This work presents a new automata-based approach centered on a set of functions and macros for identifying sequences of Lisp S-expressions using finite tree automata. The objective is to test that a given list is an element of a given tree language. We use a macro that takes a grammar and generates a function that reads off the leaves of a tree and tries to parse them as a string in a context-free language. The experimental results indicate that this approach is a viable tool for parsing Lisp lists and expressions in the abstract interpretation framework.
منابع مشابه
Pattern Formation of the FitzHugh-Nagumo Model: Cellular Automata Approach
FitzHugh-Nagumo (FHN) model is a famous Reaction-Diffusion System which first introduced for the conduction of electrical impulses along a nerve fiber. This model is also considered as an abstract model for pattern formation. Here, we have used the Cellular Automata method to simulate the pattern formation of the FHN model. It is shown that the pattern of this model is very similar to those...
متن کاملOn Two-Dimensional Pattern Matching by Finite Automata
This paper presents a general concept of two-dimensional pattern matching using conventional (one-dimensional) finite automata. Then two particular models and methods, implementations of the general principle, are presented. The first of these two models presents an automata based version of the Bird and Baker approach with lower space complexity than the original algorithm. The second introduc...
متن کاملInexact Pattern Matching Algorithms via Automata
Pattern matching occurs in various applications, ranging from simple text searching in word processors to identification of common motifs in DNA sequences in computational biology. The problem of exact pattern matching has been well studied and a number of efficient algorithms exist. However these exact pattern matching algorithms are of little help when they are applied to finding patterns in ...
متن کاملExact Analysis of Pattern Matching Algorithms with Probabilistic Arithmetic Automata
We propose a framework for the exact probabilistic analysis of window-based pattern matching algorithms, such as Boyer-Moore, Horspool, Backward DAWG Matching, Backward Oracle Matching, and more. In particular, we show how to efficiently obtain the distribution of such an algorithm’s running time cost for any given pattern in a random text model, which can be quite general, from simple uniform ...
متن کاملCellular Automata Simulation of a Bistable Reaction-Diffusion System: Microscopic and Macroscopic Approaches
The Cellular Automata method has been used to simulate the pattern formation of the Schlögl model as a bistable Reaction-Diffusion System. Both microscopic and macroscopic Cellular Automata approaches have been considered and two different methods for obtaining the probabilities in the microscopic approach have been mentioned. The results show the tendency of the system towards the more sta...
متن کاملFeature Extraction for Image Pattern Matching with Cellular Automata
It is shown that cellular automata can be used for feature extraction of images in image pattern matching systems. The problem under consideration is an image pattern matching problem of a single image against a database of LEGO bricks. The use of cellular automata is illustrated, and solves this classical content-based image retrieval problem in near realtime, with minimal memory usage.
متن کامل